<template>
  <div class="box">
    <h2 class="biaoti">饿了么</h2>
    <ul>
      <li v-for="(v, i) in arr" :key="i">{{ v }}</li>
    </ul>
    <div class="goods" v-for="(v, i) in arr2" :key="i">
      <div class="title">
        <h3>{{ v.shop }}</h3>
        <span>已送达</span>
      </div>
      <div class="info">
        <div class="imgbox">
          <img :src="v.img" alt="" />
          <img :src="v.imgs" alt="" />
        </div>
        <div class="price">
          <span>￥{{ v.price }}</span>
          <p>共{{ v.num }}件</p>
          <span class="come">再来一单</span>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
var img1 =
  "https://img2.baidu.com/it/u=837447211,2688424829&fm=253&app=138&size=w931&n=0&f=JPEG&fmt=auto?sec=1667062800&t=adeee0a9e268b4837515556b582f72d5";
var img2 =
  "https://img2.baidu.com/it/u=376662081,4235374021&fm=253&app=138&size=w931&n=0&f=JPEG&fmt=auto?sec=1667062800&t=82921b8d1abe5e4cd5e6d6a76f3e8aee";
export default {
  data() {
    return {
      arr: ["全部", "待消费", "待评价", "退款"],
      arr2: [
        {
          img: img1,
          imgs: img2,
          shop: "番茄意面 ",
          info: "爽滑可口，纵享丝滑",
          price: 25,
          text: "马上购",
          num: 9029,
        },
        {
          img: img1,
          imgs: img2,
          shop: "烤全鸡",
          info: "蜂蜜腌制，鲜香酥脆 ",
          price: 19.99,
          text: "马上购",
          num: 173,
        },
      ],
    };
  },
};
</script>

<style lang="scss" scoped>
  li{
      list-style: none;
  }
.box {
  padding: 15px 10px;
  box-sizing: border-box;
  // background-color: rgb(149, 145, 145);
  .biaoti {
    text-align: center;
    color: rgb(0, 0, 0);
  }
  > ul {
    margin-top: 10px;
    display: flex;
    > li {
      padding: 10px 20px 10px 0;
      font-weight: bold;
    }
  }
  .goods {
    background-color: rgb(255, 255, 255);
    padding: 10px 0;
    margin: 20px 0;
    border-radius: 10px;
    .title {
      display: flex;
      justify-content: space-between;
      align-items: center;
      > span {
        margin-right: 10px;
      }
    }
    .info {
      margin-top: 10px;
      display: flex;
      justify-content: space-between;
      align-items: center;
      padding: 0 12px;
      .imgbox {
        width: 200px;
        > img {
          width: 100px;
          height: 100px;
          border-radius: 5px;
        }
      }
    }
    .price {
      text-align: center;
      > p {
        margin: 8px 0;
        font-size: 14px;
      }
    }
    .come {
      margin-top: 20px;
      display: block;
      padding: 5px 15px;
      border-radius: 10px;
      color: rgb(0, 149, 255);
      border: 1px solid rgb(0, 149, 255);

    }
  }
}
</style>